FROM registry.cn-hangzhou.aliyuncs.com/shortlog/go-alpine:201 as build

COPY . /project

WORKDIR /project

RUN go mod tidy && go build -o server

FROM registry.cn-hangzhou.aliyuncs.com/shortlog/alpcn:3.17

WORKDIR /app

COPY --from=build /project/server .

EXPOSE 80

CMD ["./server"]
